package cn.zhl.设计模式.工厂;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2021-03-05 19:39
 **/
public abstract class BasicPizza {
	private String name;

	public abstract void prepare();

	public void make(){
		System.out.println(name + "，正在制作");
	}

	public void cut(){
		System.out.println(String.format("%s正在切片",name));
	}

	public void box(){
		System.out.println(String.format("%s正在装箱",name));
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	@Override
	public String toString() {
		prepare();
		make();
		cut();
		box();
		return "BasicPizza{" +
			"name='" + name + '\'' +
			'}';
	}
}
